<template>
  <div class="wrap">
    <!-- 筛选条件 -->
    <div class="labelBox">
      <form-title />
      <el-form :inline="true" :model="listQuery" class="pad-nt-20">
        <el-form-item label="">
          <el-input
            v-model="listQuery.content"
            placeholder="代理商名称/负责人/联系电话/地区"
            style="width: 260px"
          ></el-input>
        </el-form-item>
        <el-form-item label="区域">
          <selectCity :cityVal.sync="listQuery.cityVal" type="2" />
        </el-form-item>
        <el-form-item label="类型">
          <el-select
            v-model="listQuery.merchant_Type"
            placeholder="选择商户类型"
          >
            <el-option label="全部" value="0"></el-option>
            <el-option label="普通商户类型" value="1"></el-option>
            <el-option label="合伙商户类型" value="2"></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="注册日期">
          <el-date-picker
            v-model="listQuery.time"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit"
            ><i class="el-icon-upload el-icon--right"></i>筛选</el-button
          >
          <el-button @click="reset">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <!-- 表格 -->
    <div class="labelBox pad-a-20">
      <el-row
        class="line36 mb-10 font-bold"
        justify="space-between"
        type="flex"
      >
        <el-col :span="6" class="">
          总加盟商
          <span class="color-blue font-14">{{ totalNumber }}</span> 家
        </el-col>
        <el-col :span="6" class="form-top-btn">
          <el-button type="primary" @click="addDialogVisibleClick(0)"
            >新增商户</el-button
          >
          <!-- 关联站点挪至行内操作 -->
          <!-- <el-button type="primary" @click="bindDialogVisible = true"
            >关联站点</el-button
          > -->
        </el-col>
      </el-row>
      <el-table
        border
        :data="tableData"
        style="width: 100%"
        ref="multipleTable"
        tooltip-effect="dark"
        @selection-change="handleSelectionChange"
        :header-cell-style="{ textAlign: 'center' }"
        :cell-style="{ textAlign: 'center' }"
      >
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column type="index" label="序号" width="55" />
        <el-table-column prop="merchant_num" label="商户号" />
        <el-table-column prop="store_name" label="商户归属">
          <template slot-scope="scope">
            <div
              @click="bindDialogVisibleClick(scope.row)"
              style="cursor: pointer"
            >
              {{
                scope.row.merchant_type !== 10 ? "查看" : scope.row.store_name
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="principalname" label="负责人">
          <template slot-scope="scope">
            <div
              @click="bindDialogVisibleClick(scope.row)"
              style="cursor: pointer"
            >
              {{
                scope.row.merchant_type !== 10
                  ? "查看"
                  : scope.row.principalname
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="principalmobile" label="联系电话">
          <template slot-scope="scope">
            <div
              @click="bindDialogVisibleClick(scope.row)"
              style="cursor: pointer"
            >
              {{
                scope.row.merchant_type !== 10
                  ? "查看"
                  : scope.row.principalmobile
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="station_num"
          label="站点数"
          style="cursor: pointer"
        >
          <template slot-scope="scope">
            <div @click="returndetails(scope.row)" style="cursor: pointer">
              {{
                scope.row.merchant_type !== 10 ? "管理" : scope.row.station_num
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="machine_num"
          label="设备数"
          style="cursor: pointer"
        >
          <template slot-scope="scope">
            <div @click="seeClick(scope.row)" style="cursor: pointer">
              {{
                scope.row.merchant_type !== 10 ? "管理" : scope.row.machine_num
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="totalIncome" label="总营业额(元)" />
        <el-table-column prop="order_num" label="订单数(单)" />
        <el-table-column prop="addtime" label="创建日期">
          <template slot-scope="scope">
            {{ scope.row.addtime | filterTime }}
          </template>
        </el-table-column>
        <el-table-column prop="resource_store_name" label="渠道合作商">
          <template slot-scope="scope">
            <div
              @click="bindDialogVisibleClick(scope.row)"
              style="cursor: pointer"
            >
              {{
                scope.row.merchant_type !== 10
                  ? scope.row.resource_store_name
                  : "-"
              }}
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="type_description" label="类型" />
        <el-table-column prop="remarks" label="操作" width="150">
          <template slot-scope="scope">
            <el-button
              type="primary"
              @click="addDialogVisibleClick(scope.row)"
              size="mini"
              >编辑</el-button
            >
            <el-button @click="bindDialogVisibleClick(scope.row)" size="mini"
              >查看</el-button
            >
          </template>
        </el-table-column>
      </el-table>

      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="listQuery.pageIndex"
        :limit.sync="listQuery.pageSize"
        @pagination="GetAdminLeageStore"
      />
    </div>
    <!-- 设备信息弹窗 -->
    <equipment-info
      :dialogVisible="infoDialogVisible"
      @close="closeInfo"
    ></equipment-info>
    <!-- 关联站点弹窗 -->
    <!-- <bind-station
      :dialogVisible="bindDialogVisible"
      @closeBind="closeBind"
    ></bind-station> -->
    <!-- 新增洗车机弹窗 -->
    <add-equipment
      :dialogVisible.sync="addDialogVisible"
      @closeAdd="closeAdd"
      ref="child"
    ></add-equipment>
    <!-- 编辑洗车机弹窗 -->
    <edit-equipment
      :dialogVisible="editDialogVisible"
      @closeEdit="closeEdit"
    ></edit-equipment>
    <!-- 商户详情1 -->
    <el-dialog width="60%" title="商户详情" :visible.sync="bindDialogVisible">
      <div class="grid-content bg-purple-light flex">
        <div style="width: 100px; text-align: right">类型：</div>
        <div class="ml-10">{{ tkaddList.type_description }}</div>
      </div>
      <div class="flex mt-20">
        <div style="width: 100px; text-align: right">代理商信息：</div>
        <div class="ml-10">
          <el-table
            :data="tableDatasss"
            style="width: 100%"
            border
            :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }"
          >
            <el-table-column prop="date" label="合作类型" width="300">
            </el-table-column>
            <el-table-column prop="name" label="所属代理商" width="300">
            </el-table-column>
          </el-table>
        </div>
      </div>
      <div class="grid-content bg-purple-light mt-20 flex">
        <div style="width: 100px; text-align: right">商户编号：</div>
        <div class="ml-10">{{ tkaddList.merchant_num }}</div>
      </div>
      <div class="grid-content bg-purple-light mt-20 flex">
        <div style="width: 100px; text-align: right">分润方案名称：</div>
        <div class="ml-10">{{ tkaddList.description }}</div>
      </div>
      <div class="flex mt-20">
        <div style="width: 100px; text-align: right">分润规则细则：</div>
        <div class="ml-10">
          <el-table
            :data="fenrunList"
            style="width: 100%"
            border
            :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }"
          >
            <el-table-column prop="date" label="分润对象类型" width="120">
            </el-table-column>
            <el-table-column prop="gongsi" label="分润对象名称" width="180">
            </el-table-column>
            <el-table-column prop="zhagnhu" label="分润账户" width="180">
            </el-table-column>
            <el-table-column prop="fanghsi" label="分成方式" width="180">
            </el-table-column>
            <el-table-column prop="money" label="分成比列/金额" width="120">
            </el-table-column>
          </el-table>
          <div class="grid-content bg-purple-light mt-20 flex font-12">
            <div>创建时间：</div>
            <div>{{ tkaddList.addtime | filterTime }}</div>
          </div>
          <div class="grid-content bg-purple-light mt-20 flex font-12">
            <div>更新时间：</div>
            <div>{{ tkaddList.updatetime | filterTime }}</div>
          </div>
        </div>
      </div>
    </el-dialog>
    <!-- 商户详情2 -->
    <el-dialog
      width="60%"
      title="商户详情"
      :visible.sync="typespartnershipagency"
    >
      <div class="grid-content bg-purple-light flex">
        <div style="width: 100px; text-align: right">类型：</div>
        <div class="ml-10">{{ tkaddList.type_description }}</div>
      </div>
      <div class="grid-content bg-purple-light flex mt-20">
        <div style="width: 100px; text-align: right">合作方包含：</div>
        <div class="ml-10">
          <el-button type="danger" plain size="mini">资源方</el-button>
        </div>
        <div class="ml-10">
          <el-button type="danger" plain size="mini">基建方</el-button>
        </div>
        <div class="ml-10">
          <el-button type="danger" plain size="mini">场地方</el-button>
        </div>
        <div class="ml-10">
          <el-button type="danger" plain size="mini">总设备方</el-button>
        </div>
        <div class="ml-10" v-if="Merchantnumdetails.length > 4">
          <el-button type="danger" plain size="mini">子设备方</el-button>
        </div>
      </div>
      <div class="flex mt-20">
        <div style="width: 100px; text-align: right">合作方信息：</div>
        <div class="ml-10 font-12">
          <el-table
            :data="Merchantnumdetails"
            style="width: 100%"
            border
            :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }"
          >
            <el-table-column prop="name" label="合作类型" width="180">
            </el-table-column>
            <el-table-column prop="store_name" label="合作方名称" width="180">
            </el-table-column>
            <el-table-column prop="fuzer" label="负责人" width="180">
            </el-table-column>
            <el-table-column prop="mobile" label="联系电话" width="180">
            </el-table-column>
          </el-table>
        </div>
      </div>
      <div class="flex mt-20">
        <div style="width: 100px; text-align: right">回本设置：</div>
        <div class="ml-10 font-12">
          <el-table
            :data="orderreturn"
            style="width: 100%"
            border
            :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }"
          >
            <el-table-column prop="name" label="回本方" width="180">
            </el-table-column>
            <el-table-column prop="shif" label="是否回本" width="180">
            </el-table-column>
            <el-table-column prop="huib" label="回本顺序" width="180">
            </el-table-column>
          </el-table>
        </div>
      </div>
      <div class="grid-content bg-purple-light mt-20 flex">
        <div style="width: 100px; text-align: right">商户编号：</div>
        <div class="ml-10">{{ tkaddList.merchant_num }}</div>
      </div>
      <div class="grid-content bg-purple-light mt-20 flex">
        <div style="width: 100px; text-align: right">分润方案名称：</div>
        <div class="ml-10">{{ tkaddList.description }}</div>
      </div>
      <div class="flex mt-20">
        <div style="width: 100px; text-align: right">分润规则细则：</div>
        <div class="ml-10">
          <el-table
            :data="fenrunListtype"
            style="width: 100%"
            border
            :header-cell-style="{ textAlign: 'center' }"
            :cell-style="{ textAlign: 'center' }"
          >
            <el-table-column prop="date" label="分润对象类型" width="120">
            </el-table-column>
            <el-table-column prop="gongsi" label="分润对象名称" width="180">
            </el-table-column>
            <el-table-column prop="zhagnhu" label="分润账户" width="180">
            </el-table-column>
            <el-table-column prop="fanghsi" label="分成方式" width="180">
            </el-table-column>
            <el-table-column prop="money" label="分成比列/金额" width="120">
            </el-table-column>
          </el-table>
          <div class="grid-content bg-purple-light mt-20 flex font-12">
            <div>创建时间：</div>
            <div>{{ tkaddList.addtime | filterTime }}</div>
          </div>
          <div class="grid-content bg-purple-light mt-20 flex font-12">
            <div>更新时间：</div>
            <div>{{ tkaddList.updatetime | filterTime }}</div>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import equipmentInfo from "./equipmentInfo.vue";
import bindStation from "./bindStation.vue";
import addEquipment from "./addEquipment.vue";
import editEquipment from "./editEquipment.vue";
import addPartner from "@/components/partner/addPartner.vue";

import selectCity from "@/components/selectCity.vue";
export default {
  name: "Merchant",
  data() {
    return {
      params: {
        stationName: "", //所属洗车站
        foamState: "", //泡沫水位
        linkTimeStart: "", //绑定时间起
        linkTimeEnd: "", //绑定时间止
        value1: ["", ""],
      },
      waterList: [
        { id: 0, name: "全部" },
        { id: 1, name: "普通商户类型" },
        { id: 2, name: "合伙商户类型" },
      ],
      listQuery: {
        pageSize: 10,
        pageIndex: 1,
        // 站点类型 0全部，1普通加盟商，2合伙加盟商
        merchant_Type: "0",
        // // 搜索内容（名称、负责人、联系电话）
        content: "",
        // // 城市
        cityVal: [],
        // // 日期
        time: "",
      },
      storetype: "0",
      total: 0,
      totalNumber: 111, //总加盟商
      tableData: [], //列表
      infoDialogVisible: false, //洗车机详情弹窗
      bindDialogVisible: false, //商户详情普通类型
      addDialogVisible: false, //新增商户弹窗
      editDialogVisible: false, //编辑洗车机弹窗
      typespartnershipagency: false, //商户详情合伙类型

      condition: [], //条件满足

      tableDatasss: [
        {
          date: "合作方姓名",
          name: "王小虎",
        },
        {
          date: "负责人",
          name: "王小虎",
        },
        {
          date: "电话",
          name: "王小虎",
        },
      ],
      fenrunList: [
        {
          date: "平台方",
          gongsi: "七迈车科技集团有限公司",
          zhagnhu: "虚拟云账户",
          fanghsi: "按订单比列",
          money: "0.08",
        },
        {
          date: "代理商",
          gongsi: "七迈车科技集团有限公司",
          zhagnhu: "虚拟云账户",
          fanghsi: "扣除平台分润后按比列",
          money: "1",
        },
      ],
      tkaddList: "",
      Merchantnumdetails: [
        {
          name: "所属资源方",
          fuzer: "1",
          mobile: "1",
          store_name: "",
        },
        {
          name: "所属基建方",
          fuzer: "1",
          mobile: "1",
          store_name: "",
        },
        {
          name: "所属场地方",
          fuzer: "1",
          mobile: "1",
          store_name: "",
        },
        {
          name: "所属总设备方",
          fuzer: "1",
          mobile: "1",
          store_name: "",
        },
      ], //商户信息
      menamemobile: "",
      orderreturn: [
        {
          name: "基建方",
          shif: "",
          huib: "",
        },
        {
          name: "总设备方",
          shif: "",
          huib: "",
        },
      ],
      fenrunListtype: [
        {
          date: "平台方",
          gongsi: "七迈车科技集团有限公司",
          zhagnhu: "虚拟云账户",
          fanghsi: "按订单比列",
          money: "0.08",
        },
        {
          date: "资源方",
          objname: "",
          account: "虚拟云账户",
          mode: "扣除平台后按比例",
          money: "0.25",
          check: true,
        },
        {
          date: "基建方",
          objname: "",
          account: "虚拟云账户",
          mode: "扣除平台后按比例",
          money: "0.10",
          check: true,
        },
        {
          date: "场地方",
          objname: "",
          account: "虚拟云账户",
          mode: "扣除平台后按比例",
          money: "0.45",
          check: true,
        },
        {
          date: "总设备方",
          objname: "",
          account: "虚拟云账户",
          mode: "扣除平台后按比例",
          money: "0.20",
          check: true,
        },
      ],
      dialogVisibles: false, //合伙人弹框
    };
  },
  mounted() {
    this.GetAdminLeageStore();
  },
  components: {
    selectCity,
    equipmentInfo,
    bindStation,
    addEquipment,
    editEquipment,
    addPartner,
  },
  methods: {
    // 商户管理列表
    GetAdminLeageStore() {
      let data = {
        pageIndex: this.listQuery.pageIndex,
        pageSize: this.listQuery.pageSize,
        base_Region_City_Id: this.listQuery.cityVal[1], //所属城市ID
        base_Region_Province_Id: this.listQuery.cityVal[0], //所属省ID
        merchant_type: Number(this.listQuery.merchant_Type), //商户类型
        registStartTime: this.listQuery.time && this.listQuery.time[0], //绑定开始时间
        registEndTime: this.listQuery.time && this.listQuery.time[1], //绑定结束时间
        searchKey: this.listQuery.content, //查询关键字
      };
      this.$api.merchant.GetAdminLeageStore(data).then((res) => {
        this.tableData = res.data.list;
        this.total = res.data.total;
        this.totalNumber = this.total;
      });
    },
    profitobjectblur(event) {
      this.addPTList[event.id].in_Proportion = event.money;
      console.log("分润比列", event);
    },
    // 获取修改商户号详情
    GetAdminMerchantDetail(type) {
      let data = {
        merchant_num: type,
      };
      this.$api.merchant.GetAdminMerchantDetail(data).then((res) => {
        this.fenrunList = [
          {
            date: "平台方",
            gongsi: "七迈车科技集团有限公司",
            zhagnhu: "虚拟云账户",
            fanghsi: "按订单比列",
            money: "0.08",
          },
          {
            date: "代理商",
            gongsi: "七迈车科技集团有限公司",
            zhagnhu: "虚拟云账户",
            fanghsi: "扣除平台分润后按比列",
            money: "1",
          },
        ];

        this.Merchantnumdetails = [
          {
            name: "所属资源方",
            fuzer: "1",
            mobile: "1",
            store_name: "",
          },
          {
            name: "所属基建方",
            fuzer: "1",
            mobile: "1",
            store_name: "",
          },
          {
            name: "所属场地方",
            fuzer: "1",
            mobile: "1",
            store_name: "",
          },
          {
            name: "所属总设备方",
            fuzer: "1",
            mobile: "1",
            store_name: "",
          },
        ];
        this.orderreturn = [
          {
            name: "基建方",
            shif: "",
            huib: "",
          },
          {
            name: "总设备方",
            shif: "",
            huib: "",
          },
        ];
        this.fenrunListtype = [
          {
            date: "平台方",
            gongsi: "七迈车科技集团有限公司",
            zhagnhu: "虚拟云账户",
            fanghsi: "按订单比列",
            money: "0.08",
          },
          {
            date: "资源方",
            objname: "",
            account: "虚拟云账户",
            mode: "扣除平台后按比例",
            money: "0.25",
            check: true,
          },
          {
            date: "基建方",
            objname: "",
            account: "虚拟云账户",
            mode: "扣除平台后按比例",
            money: "0.10",
            check: true,
          },
          {
            date: "场地方",
            objname: "",
            account: "虚拟云账户",
            mode: "扣除平台后按比例",
            money: "0.45",
            check: true,
          },
          {
            date: "总设备方",
            objname: "",
            account: "虚拟云账户",
            mode: "扣除平台后按比例",
            money: "0.20",
            check: true,
          },
        ];

        let xqadmins = res.data.adminAccountStoreMerchants;
        this.Merchantnumdetails[0].store_name = xqadmins[0].store_name;
        this.Merchantnumdetails[0].fuzer = xqadmins[0].principalname;
        this.Merchantnumdetails[0].mobile = xqadmins[0].principalmobile;
        this.Merchantnumdetails[1].store_name = xqadmins[1].store_name;
        this.Merchantnumdetails[1].fuzer = xqadmins[1].principalname;
        this.Merchantnumdetails[1].mobile = xqadmins[1].principalmobile;
        this.Merchantnumdetails[2].store_name = xqadmins[2].store_name;
        this.Merchantnumdetails[2].fuzer = xqadmins[2].principalname;
        this.Merchantnumdetails[2].mobile = xqadmins[2].principalmobile;
        this.Merchantnumdetails[3].store_name = xqadmins[3].store_name;
        this.Merchantnumdetails[3].fuzer = xqadmins[3].principalname;
        this.Merchantnumdetails[3].mobile = xqadmins[3].principalmobile;

        if (xqadmins[1].needpayoff === 1) {
          this.orderreturn[0].shif = "是";
        } else {
          this.orderreturn[0].shif = "否";
        }
        if (xqadmins[3].needpayoff === 1) {
          this.orderreturn[1].shif = "是";
        } else {
          this.orderreturn[1].shif = "否";
        }
        this.orderreturn[0].huib = xqadmins[1].sequence;
        this.orderreturn[1].huib = xqadmins[3].sequence;

        this.fenrunListtype = [
          {
            date: "平台方",
            gongsi: "七迈车科技集团有限公司",
            zhagnhu: "虚拟云账户",
            fanghsi: "按订单比列",
            money: "0.08",
          },
          {
            date: "资源方",
            gongsi: xqadmins[0].store_name,
            zhagnhu: "虚拟云账户",
            fanghsi: "扣除平台后按比例",
            money: xqadmins[0].proportion,
          },
          {
            date: "基建方",
            gongsi: xqadmins[1].store_name,
            zhagnhu: "虚拟云账户",
            fanghsi: "扣除平台后按比例",
            money: xqadmins[1].proportion,
          },
          {
            date: "场地方",
            gongsi: xqadmins[2].store_name,
            zhagnhu: "虚拟云账户",
            fanghsi: "扣除平台后按比例",
            money: xqadmins[2].proportion,
          },
          {
            date: "总设备方",
            gongsi: xqadmins[3].store_name,
            zhagnhu: "虚拟云账户",
            fanghsi: "扣除平台后按比例",
            money: xqadmins[3].proportion,
          },
        ];
        //子设备方
        if (xqadmins.length > 4) {
          let list1 = {
            name: "所属子设备方",
            store_name: xqadmins[4].store_name,
            fuzer: xqadmins[4].principalname,
            mobile: xqadmins[4].principalmobile,
          };
          let shif;
          if (xqadmins[4].needpayoff === 1) {
            shif = "是";
          } else {
            shif = "否";
          }
          let list2 = {
            name: "子设备方",
            shif: shif,
            huib: xqadmins[4].sequence,
          };

          let list3 = {
            date: "子设备方",
            gongsi: xqadmins[4].store_name,
            zhagnhu: "虚拟云账户",
            fanghsi: "按总设备方分成比例平分",
            money: xqadmins[4].in_Proportion,
          };
          this.Merchantnumdetails.push(list1); //分润比例设置
          this.orderreturn[1] = list2;
          this.fenrunListtype.push(list3); //分润比例设置
        }
      });
    },
    //查看详情
    bindDialogVisibleClick(type) {
      this.tkaddList = "";
      this.tableDatasss[0].name = "";
      this.tableDatasss[1].name = "";
      this.tableDatasss[2].name = "";
      this.fenrunList[1].gongsi = "";
      this.fenrunList[1].money = "";
      this.fenrunList[1].date = "";

      if (type.merchant_type !== 10) {
        //!=10是合夥
        this.GetAdminMerchantDetail(type.merchant_num);
        this.typespartnershipagency = true;
      } else {
        //=10是普通
        this.bindDialogVisible = true;
      }

      this.tkaddList = type;
      this.tableDatasss[0].name = type.store_name;
      this.tableDatasss[1].name = type.principalname;
      this.tableDatasss[2].name = type.principalmobile;
      this.fenrunList[1].gongsi = type.store_name;
      this.fenrunList[1].money = type.proportion;
      this.fenrunList[1].date = type.type_description;
    },
    // 关闭洗车机信息弹窗
    closeInfo() {
      this.infoDialogVisible = false;
    },

    //关闭关联站点弹窗
    closeBind() {
      this.bindDialogVisible = false;
      this.typespartnershipagency = false;
    },

    //关闭关联站点弹窗
    closeAdd() {
      this.addDialogVisible = false;
    },
    ////切换-子组件标题显示
    addDialogVisibleClick(type) {
      if (type.id !== "") {
        this.addDialogVisible = true;
        this.$refs.child.parentMsg(type); //切换-标题显示
      } else {
        this.addDialogVisible = true;
        this.$refs.child.parentMsg(false); //切换-标题显示
      }
    },
    //关闭关联站点弹窗
    closeEdit() {
      this.editDialogVisible = false;
    },

    handleSelectionChange() {},
    handleSizeChange() {},
    handleCurrentChange() {},
    //筛选
    onSubmit() {
      this.listQuery.merchant_Type; // 站点类型0全部，1普通加盟商，2合伙加盟商
      this.listQuery.content; // 搜索内容（名称、负责人、联系电话）
      this.listQuery.cityVal; // 城市
      this.listQuery.time; //  日期
      // console.log(this.listQuery)
      this.GetAdminLeageStore();
    },
    // 重置
    reset() {
      this.listQuery.merchant_Type = "0";
      this.listQuery.content = "";
      this.listQuery.cityVal = [];
      this.listQuery.time = [];
      this.GetAdminLeageStore();
    },
    //设备数跳转
    seeClick(type) {
      this.$router.push({
        name: "Equipment",
        params: { merchant_num: type.merchant_num },
      });
    },
    //站点跳转
    returndetails(type) {
      this.$router.push({
        name: "CarWashStation",
        params: { merchant_num: type.merchant_num },
      });
    },
  },
};
</script>

<style scoped lang="scss">
.form-top-btn {
  text-align: right;
}
</style>
